﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<iBuproModel.Project>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Details</h2>

    <fieldset>
        <legend>Fields</legend>
              
        <div class="display-label">Name</div>
        <div class="display-field"><%: Model.Name %></div>
        
        <div class="display-label">Detail</div>
        <div class="display-field"><%: Model.Detail %></div>
        
        <div class="display-label">Created</div>
        <div class="display-field"><%: String.Format("{0:g}", Model.Created) %></div>
        
        <div class="display-label">Shortcut</div>
        <div class="display-field"><%: Model.Shortcut %></div>

         <div class="display-label">Project Leader</div>
         <div class="display-field"><%: Model.Principal.FirstName %> <%: Model.Principal.LastName %> | <%: Model.Principal.Username%> |  <a href="mailto:<%: Model.Principal.Email %>"><%: Model.Principal.Email%></a></div>

         <div class="display-label">Team</div>
         <% foreach(iBuproModel.User user in Model.Users) 
            {%>
            <div class="display-field"><%: user.FirstName %> <%: user.LastName %> | <%: user.Username %> |  <a href="mailto:<%: Model.Principal.Email %>"><%: user.Email %></a></div>
         <%} %>
         
        
    </fieldset>
    <p>

        <%: Html.ActionLink("Back to List", "Index") %>
        <% if (Page.User.Identity.IsAuthenticated && Page.User.IsInRole("student"))
         {%>
            <%: Html.ActionLink("Join", "Join", "Project", new  {id = Model.Id },null)%>
        <%} %>
    </p>

</asp:Content>

